Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added New Relic Control health check #2841

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jsumners-nr
Copy link
Contributor

This PR resolves #2838.

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.22%. Comparing base (972b59d) to head (93ac2fa).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2841      +/-   ##
==========================================
- Coverage   97.26%   97.22%   -0.04%     
==========================================
  Files         294      295       +1     
  Lines       46405    46625     +220     
==========================================
+ Hits        45135    45333     +198     
- Misses       1270     1292      +22     
Flag Coverage Δ
integration-tests-cjs-18.x 73.07% <55.69%> (-0.11%) ⬇️
integration-tests-cjs-20.x 73.08% <55.69%> (-0.09%) ⬇️
integration-tests-cjs-22.x 73.11% <55.69%> (-0.09%) ⬇️
integration-tests-esm-18.x 49.89% <43.34%> (-0.02%) ⬇️
integration-tests-esm-20.x 49.90% <43.34%> (-0.02%) ⬇️
integration-tests-esm-22.x 49.94% <43.34%> (-0.02%) ⬇️
unit-tests-18.x 89.01% <100.00%> (+0.05%) ⬆️
unit-tests-20.x 89.01% <100.00%> (+0.05%) ⬆️
unit-tests-22.x 89.02% <100.00%> (+0.05%) ⬆️
versioned-tests-18.x 78.83% <43.34%> (-0.35%) ⬇️
versioned-tests-20.x 78.86% <43.34%> (-0.32%) ⬇️
versioned-tests-22.x 78.84% <43.34%> (-0.35%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@bizob2828 bizob2828 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know this is in draft, just called out the lack of config items defined

static STATUS_INTERNAL_UNEXPECTED_ERROR = 'NR-APM-300'

constructor({ logger = defaultLogger, setInterval = global.setInterval } = {}) {
const fleetId = process.env.NEW_RELIC_SUPERAGENT_FLEET_ID
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these should be configuration items, based on spec, and names appear to be updated to be agent_control not superagent:

Name Environment Variable Name Description Default Required?
agent_control.fleet_id NEW_RELIC_AGENT_CONTROL_FLEET_ID This assigns a fleet ID to the language agent. This ID is generated by Agent Control. If this setting is present, it denotes that the agent is running in an Agent Control environment and the health file(s) will be generated. n/a MUST
agent_control.health.delivery_location NEW_RELIC_AGENT_CONTROL_HEALTH_DELIVERY_LOCATION A file: URI that specifies the fully qualified directory path for health file(s) to be written to. For example: file:///var/lib/newrelic-agent_control/fleet/agents.d/<fleet_id> N/A MUST
agent_control.health.frequency NEW_RELIC_AGENT_CONTROL_HEALTH_FREQUENCY The interval, in seconds, of how often the health file(s) will be written. 5 MUST

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we do load the config before creating the agent. So adding in support for those config values will be feasible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs PR Review
Development

Successfully merging this pull request may close these issues.

[Spike] Super Agent Health Check
2 participants